<#include "${ftl_skin}/common/header.ftl">

</head>
<body>

<div class="row ibox float-e-margins dialog-panel-body">
    <div class="ibox-content">
        <form id="formId"  class="form-horizontal" action="${path.servicePath }/employee/modifypassword.do" method="post">

            <fieldset>

            <div class="form-group">
                <label class="col-xs-2 control-label">原来密码</label>

                <div class="col-xs-10">
                    <input id="prepassword" name="prepassword" class="form-control required" type="password" value="" maxlength="32" />
                </div>
            </div>
            <div class="form-group">
                <label class="col-xs-2 control-label">密码</label>

                <div class="col-xs-10">
                    <input id="p1" name="p1" class="form-control required" type="password" value="" maxlength="32" minlength="6" />
                </div>
            </div>
            <div class="form-group">
                <label class="col-xs-2 control-label">确认密码</label>

                <div class="col-xs-10">
                    <input id="password" name="password" class="form-control" type="password" value="" maxlength="50" equalTo="#p1" />
                </div>
            </div>

            <div class="hr-line-dashed"></div>
            <div class="form-group">
                <div class="col-xs-4 col-xs-offset-2">
                    <button class="btn btn-primary" type="button" onClick="javascript:HFFormSubmit('#formId', submitCallback, null);return false;">保存内容</button>
                    <button class="btn btn-white" type="button" onClick="javascript:closeDialog('');return false;">取消</button>
                </div>
            </div>

            </fieldset>
        </form>
    </div>
</div>



<#include "${ftl_skin}/common/js.ftl">


<script type="text/javascript">
    $(function(){
    	//使弹窗可滚动，需在第一个div加dialog-panel-body
    	initDialogPanel();
        //初始化表单验证
        initHFForm('#formId');
    });


    function submitCallback(msg){
        // alert(JSON.stringify(msg));
        if(msg.state == 1){
            HFToastr("修改成功");
            window.setTimeout(function(){
            	closeDialog('reload');
            },1000);
        } else if(msg.state==-2) {
        	HFToastrError("密码错误");
        } else {
        	HFToastrError("操作失败");
        }
    }
    
</script>

<#include "${ftl_skin}/common/footer.ftl">